We start by making a normal resource pack and after that we make a new directory: assets/minecraft/holdmyitems inside the directory we can make a file named item_addon.lua and open it with your favorite text editor, i suggest either Zed, Notepad++, i advise to not use VScode on low-end systems since it’s quite heavy otherwise it’s another good text editor.

let’s see an example

-- if we have a enchanted book in our hand
if (I:isOf(context.item, Items:get("minecraft:enchanted_book"))) then
  M:moveX(context.matrices, -20) -- we move it on the X axis by -20
  M:moveY(context.matrices, 0.04) -- we move it on the Y axis by 0.04
  M:moveZ(context.matrices, 0.15) -- we move it on the Z axis by 0.015
end
that will make the enchanted book have a different position, the code basically mean “if the player has an enchanted book in his hands, move it in those positions”, feel free to modify the code as you wish. continue reading in the other sections to discover more

back to index